<?php
/**
 * <https://y.st./>
 * Copyright © 2016 Alex Yst <mailto:copyright@y.st>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <https://www.gnu.org./licenses/>.
**/

$xhtml = array(
	'<{title}>' => 'Default port numbers',
	'<{body}>' => <<<END
<p>
	My <a href="https://marcwithac.bandcamp.com/album/unicorns-get-more-bacon">$a[CD] from Marc With a C</a> came in the mail today.
	The large envelope read <q><span class="underline">DO</span> <span class="underline">NOT</span> <span class="underline">BEND</span>!!!</q> in full capital letters and underlines, but the postal service had managed to let it get bent anyway, damaging the contents.
	As it turns out, I did not need to order the vinyl version of the album to get the bonus for early adopters that had been hinted at, but I would need a record player to make use of the bonus.
	It is a two-song forty-five $a[RPM] vinyl record.
	Though the postal service had damaged the record&apos;s sheath, I found the record to be quite amusing.
	I do not recognize either of the songs on the record, but at some point when I have more time, I might look them up.
</p>
<p>
	I received the letter from the local community college saying that I have been accepted.
	The school told me to hold off a bit before asking for an appointment to review my credits and decide what courses I need to take, but I forget how long that they said that I should wait.
	I will be in the area on Monday as the clinic is very close to there, so I will probably drop by then, despite it probably being earlier than they wanted.
	If they have a problem with it, they can simply tell me again what the best date for me to drop by is.
	I will likely only be able to schedule a meeting anyway, so scheduling early sounds like a good thing.
</p>
<p>
	As the generic $a[URI] normalization process includes removing the port from the $a[URI] if it matches the scheme-specific default port, I need a list of default ports on hand just to perform generic $a[URI] normalization.
	I decided to implement the list of $a[URI] scheme default port numbers as a constant, but I quickly found that the constant&apos;s array was huge.
	I think that separating constants into their own files might be a better option than I had originally thought.
	In the past, constants could not hold arrays and holding a single value in each file seems like a waste.
	With arrays though, like values, or rather, values related to the same topic, can be implemented as arrays instead of scalar values.
	Not only does this allow single-constant files to make more sense, it also provides a much better grouping mechanism for related information that the previously-used constant name prefixes.
</p>
<p>
	I found a couple interesting schemes today.
	The first is the <a href="https://www.iana.org/assignments/uri-schemes/prov/adiumxtra">adiumxtra</a> scheme.
	No real information is available about how it works, but my best guess when looking at their website is that it works exactly like the $a[HTTP] scheme, but because it is technically a different scheme, Adium is able to set itself as the handler of $a[URI]s using it, so hyperlinks can be set up that facilitate easy installation of plugins.
	I would try some experimenting, but <a href="https://adium.im/about/">Adium is only available for OS X</a>.
	Another interesting scheme that I ran across is the <a href="https://www.iana.org/assignments/uri-schemes/prov/apt">apt</a> scheme.
	Allegedly, this allows one to link to a package in a Debian repository.
	It does not seem to work on my machine, but it is worth using whenever I talk about Debian packages.
</p>
<p>
	On the topic of $a[URI]s, I have something that I should really get out there.
	A while ago, I said that $a[HTTPS] and $a[HTTP] $a[URI]s that lack a path are technically invalid.
	By that, I meant that <code>https://example.com</code> is an invalid $a[URI], as it did not even include the <code>/</code> path.
	However, a few days ago, I found new information.
	That $a[URI], as well as other $a[HTTPS] and $a[HTTP] $a[URI]s that lack a trailing slash, are still valid.
	And why is this? Well, while it is true that every $a[URI] <strong>*must*</strong> contain a path, that path can be blank.
	In the case of $a[URI]s that contain an authority, the path must either be blank or begin with a slash, but blank paths are always acceptable unless the scheme defines otherwise.
	Many schemes seem to define a blank path as being equivalent to the a path consisting of a single slash, and that is the case with the <code>https:</code> and <code>http:</code> schemes.
	With my new $a[URI]-parsing tools that I am working on, I may store blank-path $a[URI]s in my database instead of single-slash path $a[URI]s.
</p>
<p>
	It seems that on Saturday, I will be volunteering to be a pretend victim for an emergency preparedness educational meeting.
	On Sunday, I will likely be headed back to Springfield to do more cleaning and sorting.
</p>
<p>
	My <a href="/a/canary.txt">canary</a> still sings the tune of freedom and transparency.
</p>
END
);
